# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=filezilla
pkgver=3.60.1
pkgrel=0
pkgdesc="FTP Client"
url="https://filezilla-project.org/"
arch="all"
license="GPL-2.0-or-later"
makedepends="gnutls-dev gtk+3.0-dev libfilezilla-dev>=0.30.0 libidn-dev
	pugixml-dev sqlite-dev wxgtk3-dev xdg-utils"
subpackages="$pkgname-doc $pkgname-lang"
source="https://download.filezilla-project.org/client/FileZilla_${pkgver}_src.tar.bz2
	missing-list-include.patch"
case "$CARCH" in
	s390x) options="$options !check";; # ratelimit_test fails
	riscv64) options="$options textrels";; # temp allow textrels
esac

build() {
	export CXXFLAGS="$CXXFLAGS -include assert.h"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--without-dbus \
		--with-wx-config=/usr/bin/wx-config-gtk3 \
		--disable-manualupdatecheck \
		--disable-autoupdatecheck
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
417b97afd8e9434c625392c4025ab7d977d58fad2dfe17c8ff856233c70b5d77df22c4e1b76120d9d5dba3bce1c61453808deb26314dbde7ec425d643c4f83d9  FileZilla_3.60.1_src.tar.bz2
6280da4f1c359be7d49e8b590f036ddf1220ce6145fbba6c789c89d444a2a85d283275e402d996a6d28e9d5129f646b7920005d5d71faa4a80f0c734133c48a1  missing-list-include.patch
"
